cargo.git
11 years agofix travis script
Robin Gloster [Tue, 24 Feb 2015 12:00:58 +0000 (13:00 +0100)]
fix travis script

11 years agorustup
Robin Gloster [Sun, 22 Feb 2015 23:06:12 +0000 (00:06 +0100)]
rustup

11 years agoAuto merge of #1321 - dlevy47:bugfix/no-proxy, r=alexcrichton
bors [Thu, 19 Feb 2015 15:44:24 +0000 (15:44 +0000)]
Auto merge of #1321 - dlevy47:bugfix/no-proxy, r=alexcrichton

Currently, cargo uses `curl_easy_setopt` to explicitly set the http proxy on a curl handle if any of the following are present:

* cargo config `http.proxy`
* git config `http.proxy`
* `HTTP_PROXY` environment variable

The act of explicitly setting the http proxy disables curl's logic for determining which proxy to use for a URL, and breaks the `no_proxy` environment variable. This PR privatizes `cargo::ops::registry::http_proxy` and adds an additional function `cargo::ops::registry::http_proxy_exists` to determine whether or not to use the `git2-curl` subtransport.

11 years agoChange cargo to explicitly set curl proxy settings only when necessary
calc0000 [Wed, 18 Feb 2015 01:39:27 +0000 (20:39 -0500)]
Change cargo to explicitly set curl proxy settings only when necessary
(when it is specified in either the cargo config or the git config).
Otherwise, use curl's logic to pick a proxy (or not).

11 years agoAuto merge of #1288 - alexcrichton:issue-1058, r=huonw
bors [Wed, 18 Feb 2015 16:20:53 +0000 (16:20 +0000)]
Auto merge of #1288 - alexcrichton:issue-1058, r=huonw

Previously the build script's profile was used instead of the target's build
script, causing the wrong environment variables to get set.

Closes #1058

11 years agoSet build script env vars correctly
Alex Crichton [Wed, 11 Feb 2015 05:03:31 +0000 (21:03 -0800)]
Set build script env vars correctly

Previously the build script's profile was used instead of the target's build
script, causing the wrong environment variables to get set.

Closes #1058

11 years agoAuto merge of #1314 - AnthIste:build-script-updates, r=alexcrichton
bors [Tue, 17 Feb 2015 17:32:25 +0000 (17:32 +0000)]
Auto merge of #1314 - AnthIste:build-script-updates, r=alexcrichton

The examples given for `build.rs` do not compile against the latest rust. Instead of adapting to use modules such as `std::old_io`, I attempted to port the examples to use the new `io` and `path` modules.

11 years agoUpdate example build.rs scripts to reflect latest Rust changes
Ruben Bakker [Sun, 15 Feb 2015 20:34:51 +0000 (22:34 +0200)]
Update example build.rs scripts to reflect latest Rust changes

11 years agoAuto merge of #1317 - alexcrichton:issue-1297, r=huonw
bors [Tue, 17 Feb 2015 05:00:30 +0000 (05:00 +0000)]
Auto merge of #1317 - alexcrichton:issue-1297, r=huonw

Not sure why we were doing this, it's quite useful!

Closes #1297

11 years agoDon't discard docopt error information
Alex Crichton [Mon, 16 Feb 2015 04:45:59 +0000 (20:45 -0800)]
Don't discard docopt error information

Not sure why we were doing this, it's quite useful!

Closes #1297

11 years agoAuto merge of #1310 - tanadeau:use-struct-variant, r=alexcrichton
bors [Mon, 16 Feb 2015 06:23:03 +0000 (06:23 +0000)]
Auto merge of #1310 - tanadeau:use-struct-variant, r=alexcrichton

Minor code cleanup for readability and usability for `Method` enum.

11 years agoAuto merge of #1301 - brson:installer-next, r=alexcrichton
bors [Mon, 16 Feb 2015 06:06:41 +0000 (06:06 +0000)]
Auto merge of #1301 - brson:installer-next, r=alexcrichton

Needs to land immediately after https://github.com/rust-lang/rust/pull/22256.

11 years agoUse struct variant instead of long, commented tuple
Trent Nadeau [Sat, 14 Feb 2015 19:42:16 +0000 (14:42 -0500)]
Use struct variant instead of long, commented tuple

11 years agoAuto merge of #1284 - apasel422:issue-1277, r=alexcrichton
bors [Sat, 14 Feb 2015 01:30:29 +0000 (01:30 +0000)]
Auto merge of #1284 - apasel422:issue-1277, r=alexcrichton

This is a WIP for #1277. I would like to add a test for the new behavior in `tests/test_cargo_test.rs`, but I'm having a hard time getting the output to match.

Some feedback would be great to see if this is even the right approach.

11 years agoAuto merge of #1292 - brson:version, r=huonw
bors [Fri, 13 Feb 2015 22:31:46 +0000 (22:31 +0000)]
Auto merge of #1292 - brson:version, r=huonw

```
cargo 0.0.1-pre (9404539 2015-02-09 20:54:26 +0000) (built 2015-02-11)
```

11 years agoAdd the build date to the reported version
Brian Anderson [Fri, 13 Feb 2015 22:29:08 +0000 (14:29 -0800)]
Add the build date to the reported version

```
cargo 0.0.1-pre (9404539 2015-02-09) (built 2015-02-11)
```

11 years agopass features to doctest binary
Andrew Paseltiner [Mon, 9 Feb 2015 19:14:27 +0000 (14:14 -0500)]
pass features to doctest binary

11 years agoUpgrade rust-installer
Brian Anderson [Wed, 11 Feb 2015 21:14:50 +0000 (13:14 -0800)]
Upgrade rust-installer

11 years agoupdate Rust
Andrew Paseltiner [Fri, 13 Feb 2015 04:10:07 +0000 (23:10 -0500)]
update Rust

11 years agoAuto merge of #1283 - alexcrichton:bad-error, r=huonw
bors [Fri, 13 Feb 2015 00:24:36 +0000 (00:24 +0000)]
Auto merge of #1283 - alexcrichton:bad-error, r=huonw

Closes rust-lang/crates.io#130

11 years agoAuto merge of #1285 - alexcrichton:issue-636, r=huonw
bors [Thu, 12 Feb 2015 05:52:50 +0000 (05:52 +0000)]
Auto merge of #1285 - alexcrichton:issue-636, r=huonw

Due to libgit2 not supporting HTTP proxies, the custom transport API of the
library must be used to reimplement the HTTP transport with proxy support. The
git2-curl crate implements this transport on top of the curl-rust crate. By
using libcurl we gain all sorts of proxy support for free.

This transport is not used by default, however, as it is not well battle tested
and the architecture is not currently ideal (download the entire repo into
memory on a clone). Only when an HTTP proxy is present is the new transport
used.

The other drawback of git2-curl is that it does not currently support
authentication. If a private git repository is cloned or authentication is
required then it will generate an error instead of correctly asking for
credentials.

Closes #636

11 years agoAdd git2-curl as a dependency
Alex Crichton [Fri, 6 Feb 2015 07:28:18 +0000 (23:28 -0800)]
Add git2-curl as a dependency

Due to libgit2 not supporting HTTP proxies, the custom transport API of the
library must be used to reimplement the HTTP transport with proxy support. The
git2-curl crate implements this transport on top of the curl-rust crate. By
using libcurl we gain all sorts of proxy support for free.

This transport is not used by default, however, as it is not well battle tested
and the architecture is not currently ideal (download the entire repo into
memory on a clone). Only when an HTTP proxy is present is the new transport
used.

The other drawback of git2-curl is that it does not currently support
authentication. If a private git repository is cloned or authentication is
required then it will generate an error instead of correctly asking for
credentials.

Closes #636

11 years agoAuto merge of #1278 - alexcrichton:style, r=brson
bors [Mon, 9 Feb 2015 20:54:26 +0000 (20:54 +0000)]
Auto merge of #1278 - alexcrichton:style, r=brson

* Update to rust master
* Remove many calls to `.as_slice` (deref coercions)
* Remove `get_` prefixes

11 years agoUpdate to rust master
Alex Crichton [Mon, 9 Feb 2015 16:16:08 +0000 (08:16 -0800)]
Update to rust master

11 years agoAuto merge of #1282 - vrinek:master, r=alexcrichton
bors [Mon, 9 Feb 2015 19:24:58 +0000 (19:24 +0000)]
Auto merge of #1282 - vrinek:master, r=alexcrichton

11 years agoImprove error message for missing example/bin
Alex Crichton [Mon, 9 Feb 2015 16:28:36 +0000 (08:28 -0800)]
Improve error message for missing example/bin

Closes rust-lang/crates.io#130

11 years agoAdd link to requirement strings explanation in the manifest.md doc
Kostas Karachalios [Mon, 9 Feb 2015 15:42:54 +0000 (16:42 +0100)]
Add link to requirement strings explanation in the manifest.md doc

11 years agoRemove leading `get_` prefix from accessors
Alex Crichton [Fri, 6 Feb 2015 08:36:19 +0000 (00:36 -0800)]
Remove leading `get_` prefix from accessors

The current naming is [against our guidelines][guidelines]

[guidelines]: https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis

11 years agoDown with .as_slice()!
Alex Crichton [Fri, 6 Feb 2015 08:06:39 +0000 (00:06 -0800)]
Down with .as_slice()!

11 years agoUpdate to rust master
Alex Crichton [Fri, 6 Feb 2015 07:27:53 +0000 (23:27 -0800)]
Update to rust master

11 years agoAuto merge of #1271 - alexcrichton:issue-1267, r=brson
bors [Fri, 6 Feb 2015 22:55:29 +0000 (22:55 +0000)]
Auto merge of #1271 - alexcrichton:issue-1267, r=brson

Why not use `try!` instead!

Closes #1267

11 years agoAuto merge of #1270 - alexcrichton:issue-1105, r=brson
bors [Fri, 6 Feb 2015 22:44:07 +0000 (22:44 +0000)]
Auto merge of #1270 - alexcrichton:issue-1105, r=brson

Closes #1105

11 years agoAuto merge of #1269 - alexcrichton:issue-961, r=brson
bors [Fri, 6 Feb 2015 22:31:46 +0000 (22:31 +0000)]
Auto merge of #1269 - alexcrichton:issue-961, r=brson

Over time this functionality has become obsolete through other means. Due to the
usage of `-L dependency=foo` it's not possible to pick up stale dependencies by
accident, and due to `--extern` you can only pick up a dependency. All of the
cases that auto-cleaning was fixing are now fixed through other methods, so
there's not much use ensuring a "clean build directory" any more.

This has the benefit of fixing issues like #961 where the downside of long
compiles outweighs the benefits of a "let's pretend we started from scratch"
build.

Closes #961

11 years agoAuto merge of #1261 - alexcrichton:issue-1259, r=wycats
bors [Wed, 4 Feb 2015 23:00:30 +0000 (23:00 +0000)]
Auto merge of #1261 - alexcrichton:issue-1259, r=wycats

Previously if a fingerprint was considered fresh based on mtime, it would not
get updated once a compilation finished with the new precise fingerprint (it
would use the older fingerprint). This alters the `resolve` method to take a
flag which disables this behavior and forces looking at the filesystem for a
fingerprint.

Closes #1259

11 years agoAdd a flag to force resolution of a fingerprint
Alex Crichton [Sun, 1 Feb 2015 23:21:15 +0000 (15:21 -0800)]
Add a flag to force resolution of a fingerprint

Previously if a fingerprint was considered fresh based on mtime, it would not
get updated once a compilation finished with the new precise fingerprint (it
would use the older fingerprint). This alters the `resolve` method to take a
flag which disables this behavior and forces looking at the filesystem for a
fingerprint.

Closes #1259

11 years agoRemove auto-cleaning of the build directory
Alex Crichton [Wed, 14 Jan 2015 05:23:43 +0000 (21:23 -0800)]
Remove auto-cleaning of the build directory

Over time this functionality has become obsolete through other means. Due to the
usage of `-L dependency=foo` it's not possible to pick up stale dependencies by
accident, and due to `--extern` you can only pick up a dependency. All of the
cases that auto-cleaning was fixing are now fixed through other methods, so
there's not much use ensuring a "clean build directory" any more.

This has the benefit of fixing issues like #961 where the downside of long
compiles outweighs the benefits of a "let's pretend we started from scratch"
build.

Closes #961

11 years agoAuto merge of #1275 - alexcrichton:update, r=alexcrichton
bors [Wed, 4 Feb 2015 18:31:58 +0000 (18:31 +0000)]
Auto merge of #1275 - alexcrichton:update, r=alexcrichton

Expanding on the work of #1256 to update to rustc 02-02

11 years agoUpdate to the most current nightly
Alex Crichton [Wed, 4 Feb 2015 18:12:49 +0000 (10:12 -0800)]
Update to the most current nightly

11 years agoMerge branch 'rust-master' of https://github.com/gbsf/cargo into update
Alex Crichton [Wed, 4 Feb 2015 18:07:07 +0000 (10:07 -0800)]
Merge branch 'rust-master' of https://github.com/gbsf/cargo into update

11 years agoAvoid `unwrap` when parsing lockfiles
Alex Crichton [Wed, 4 Feb 2015 07:27:06 +0000 (23:27 -0800)]
Avoid `unwrap` when parsing lockfiles

Why not use `try!` instead!

Closes #1267

11 years agoSupport update --precise for registry deps
Alex Crichton [Wed, 4 Feb 2015 00:55:07 +0000 (16:55 -0800)]
Support update --precise for registry deps

Closes #1105

11 years agoSquelch warnings
Gabriel Souza Franco [Fri, 30 Jan 2015 21:22:02 +0000 (19:22 -0200)]
Squelch warnings

11 years agoFix failing test
Gabriel Souza Franco [Fri, 30 Jan 2015 19:24:53 +0000 (17:24 -0200)]
Fix failing test

11 years agoRemove unnecessary allow(unstable)
Gabriel Souza Franco [Fri, 30 Jan 2015 18:12:47 +0000 (16:12 -0200)]
Remove unnecessary allow(unstable)

11 years agoUpdate rustversion.txt
Gabriel Souza Franco [Fri, 30 Jan 2015 17:53:15 +0000 (15:53 -0200)]
Update rustversion.txt

11 years agoWorkaround to make code compile
Gabriel Souza Franco [Fri, 30 Jan 2015 17:38:33 +0000 (15:38 -0200)]
Workaround to make code compile

Blame @alexcrichton

11 years agoUpdate dependencies
Gabriel Souza Franco [Fri, 30 Jan 2015 15:21:23 +0000 (13:21 -0200)]
Update dependencies

11 years agoUpdate log crate to v0.2
Gabriel Souza Franco [Fri, 30 Jan 2015 14:36:24 +0000 (12:36 -0200)]
Update log crate to v0.2

11 years agoWriter::write → Writer::write_all
Gabriel Souza Franco [Fri, 30 Jan 2015 14:38:21 +0000 (12:38 -0200)]
Writer::write → Writer::write_all

11 years agostd::io → std::old_io
Gabriel Souza Franco [Fri, 30 Jan 2015 13:48:43 +0000 (11:48 -0200)]
std::io → std::old_io

11 years agoAuto merge of #1250 - alexcrichton:issue-1248, r=brson
bors [Fri, 30 Jan 2015 02:47:30 +0000 (02:47 +0000)]
Auto merge of #1250 - alexcrichton:issue-1248, r=brson

When probing a repository for files that should be considered as inputs for a
build script we should just skip submodules that haven't been checked out
instead of throwing an error.

Closes #1248

11 years agoAuto merge of #1243 - alexcrichton:issue-1239, r=brson
bors [Fri, 30 Jan 2015 02:37:24 +0000 (02:37 +0000)]
Auto merge of #1243 - alexcrichton:issue-1239, r=brson

Previously a build script would assign itself to the platform requirement for
the first target of a package, but it's more correct to consider all targets for
platform requirements as there may be both a plugin and target requirement.

Closes #1236

11 years agoAuto merge of #1247 - tshepang:hgignore-love, r=alexcrichton
bors [Thu, 29 Jan 2015 20:05:39 +0000 (20:05 +0000)]
Auto merge of #1247 - tshepang:hgignore-love, r=alexcrichton

11 years agoAuto merge of #1242 - alexcrichton:issue-1236, r=wycats
bors [Thu, 29 Jan 2015 19:50:58 +0000 (19:50 +0000)]
Auto merge of #1242 - alexcrichton:issue-1236, r=wycats

Set out to solve #1236, but ended up solving #834 as well!

11 years agoDon't require all submodules are checked out
Alex Crichton [Thu, 29 Jan 2015 19:41:00 +0000 (11:41 -0800)]
Don't require all submodules are checked out

When probing a repository for files that should be considered as inputs for a
build script we should just skip submodules that haven't been checked out
instead of throwing an error.

Closes #1248

11 years agoForbid cyclic dependencies
Alex Crichton [Thu, 29 Jan 2015 05:50:06 +0000 (21:50 -0800)]
Forbid cyclic dependencies

Re-jigger some code in the resolver and refactor a little bit to get the
ordering of checks right to forbid cyclic dependencies from ever reaching the
backend.

Closes #834

11 years agoConsider all targets for platform requirements
Alex Crichton [Thu, 29 Jan 2015 06:28:31 +0000 (22:28 -0800)]
Consider all targets for platform requirements

Previously a build script would assign itself to the platform requirement for
the first target of a package, but it's more correct to consider all targets for
platform requirements as there may be both a plugin and target requirement.

Closes #1230

11 years agonew: use .{git,hg}ignore syntax that's also understood by Mercurial
Tshepang Lekhonkhobe [Thu, 29 Jan 2015 17:41:53 +0000 (19:41 +0200)]
new: use .{git,hg}ignore syntax that's also understood by Mercurial

11 years agoConsider transitive fingerprints for freshness
Alex Crichton [Thu, 29 Jan 2015 03:37:19 +0000 (19:37 -0800)]
Consider transitive fingerprints for freshness

Originally discovered through #1236, this commit fixes a bug in Cargo where
crates may not be recompiled when they need to (leading to obscure errors from
the compiler). The scenario in question looks like:

* Assume a dependency graph of `A -> B -> C` and `A -> C`
* Build all packages
* Modify C
* Rebuild, but hit Ctrl+C while B is building
* Modify A
* Rebuild again

Previously, Cargo only considered the freshness of a package to be the freshness
of the package itself (checking source files, for example). To handle transitive
recompilations, Cargo propagates a dirty bit throughout the dependency graph
automatically (instead if calculating it as such).

In the above example, however, we have a problem where as part of the last
rebuild Cargo thinks `B` and `C` are fresh! The artifact for `C` was just
recompiled, but `B`'s source code is untainted, so Cargo does not think that it
needs to recompile `B`. This is wrong, however, because one of `B`'s
dependencies was rebuilt, so it needs to be rebuilt.

To fix this problem, the fingerprint (a short hash) for all packages is now
transitively propagated (the fingerprint changes when an upstream package
changes). This should ensure that even when Ctrl+C is hit (or the situation
explained in #1236) that Cargo will still consider packages whose source code is
untainted as candidates for recompilation.

The implementation is somewhat tricky due to the actual fingerprint for a path
dependency not being known until *after* the crate is compiled (the fingerprint
is the mtime of the dep-info file).

Closes #1236

11 years agoAuto merge of #1232 - alexcrichton:issue-1231, r=huonw
bors [Thu, 29 Jan 2015 00:56:56 +0000 (00:56 +0000)]
Auto merge of #1232 - alexcrichton:issue-1231, r=huonw

* Break out the error reporting to its own separate function
* Don't pass `Context` by value as it's quite large, instead pass `Box<Context>`
* Don't bother monomorphizing `R: Registry`, instead just take a trait object.

Closes #1231

11 years agoAuto merge of #1238 - SimonSapin:patch-2, r=alexcrichton
bors [Wed, 28 Jan 2015 22:33:03 +0000 (22:33 +0000)]
Auto merge of #1238 - SimonSapin:patch-2, r=alexcrichton

11 years agoUpdate a code example for language change
Simon Sapin [Wed, 28 Jan 2015 21:32:27 +0000 (22:32 +0100)]
Update a code example for language change

11 years agoOptimize stack usage of activate_deps slightly
Alex Crichton [Tue, 27 Jan 2015 05:18:57 +0000 (21:18 -0800)]
Optimize stack usage of activate_deps slightly

* Break out the error reporting to its own separate function
* Don't pass `Context` by value as it's quite large, instead pass `Box<Context>`
* Don't bother monomorphizing `R: Registry`, instead just take a trait object.

Closes #1231

11 years agoAuto merge of #1227 - retep998:master, r=huonw
bors [Mon, 26 Jan 2015 02:53:23 +0000 (02:53 +0000)]
Auto merge of #1227 - retep998:master, r=huonw

Fixes the following issue while building Cargo
```
   Compiling cargo v0.1.0 (file:///C:/msys64/home/Peter/cargo)
src\cargo\lib.rs:7:1: 7:20 error: can't find crate for `regex`
src\cargo\lib.rs:7 extern crate regex;
                   ^~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
Could not compile `cargo`.
```

11 years agoAdd explicit dependency on regex.
Peter Atashian [Mon, 26 Jan 2015 00:59:38 +0000 (19:59 -0500)]
Add explicit dependency on regex.

Signed-off-by: Peter Atashian <retep998@gmail.com>
11 years agoAuto merge of #1222 - alexcrichton:update, r=alexcrichton
bors [Sun, 25 Jan 2015 07:48:47 +0000 (07:48 +0000)]
Auto merge of #1222 - alexcrichton:update, r=alexcrichton

11 years agoUpdate to rust 2015-01-24
Alex Crichton [Sun, 25 Jan 2015 06:03:42 +0000 (22:03 -0800)]
Update to rust 2015-01-24

11 years agoMerge branch 'master' of https://github.com/suhr/cargo into update
Alex Crichton [Sun, 25 Jan 2015 05:48:48 +0000 (21:48 -0800)]
Merge branch 'master' of https://github.com/suhr/cargo into update

11 years agoAuto merge of #1218 - emanueLczirai:verbose1, r=alexcrichton
bors [Sat, 24 Jan 2015 19:51:27 +0000 (19:51 +0000)]
Auto merge of #1218 - emanueLczirai:verbose1, r=alexcrichton

and also show that cargo's version after rustc's one

Closes #1216

11 years agopass --verbose to cargo when VERBOSE env is set
emanueLczirai [Sat, 24 Jan 2015 17:48:19 +0000 (18:48 +0100)]
pass --verbose to cargo when VERBOSE env is set

and also show that cargo's version after rustc's one

11 years agoupdate to recent rust changes: part #2
Сухарик [Sat, 24 Jan 2015 08:16:54 +0000 (11:16 +0300)]
update to recent rust changes: part #2

11 years agofix build on recent rust: use `unwrap` on `encode`
Сухарик [Fri, 23 Jan 2015 22:55:25 +0000 (01:55 +0300)]
fix build on recent rust: use `unwrap` on `encode`

11 years agoupdate to recent rust changes: part #1
Сухарик [Fri, 23 Jan 2015 18:42:29 +0000 (21:42 +0300)]
update to recent rust changes: part #1

11 years agoAuto merge of #1202 - alexcrichton:issue-1201, r=huonw
bors [Thu, 22 Jan 2015 06:06:34 +0000 (06:06 +0000)]
Auto merge of #1202 - alexcrichton:issue-1201, r=huonw

Previously an error's description was not printed at all if it was not a "human
error". This alters the logic to always print the description on --verbose, as
well as ensuring that --verbose is suggested if this is the case and we're not
verbose.

Closes #1201

11 years agoAuto merge of #1205 - alexcrichton:case-sensitivity, r=brson
bors [Thu, 22 Jan 2015 05:48:09 +0000 (05:48 +0000)]
Auto merge of #1205 - alexcrichton:case-sensitivity, r=brson

All crates published will enter the index in an all-lowercase fashion. This is
done because the index may be checked out on case-insensitive filesystems and
its integrity needs to be preserved. When looking for a file in the index, a
crate's name is transformed to all lowercase, but the mentioned name in the
index is verified against the name queried to ensure that they match.

Closes rust-lang/crates.io#93
cc rust-lang/crates.io-index#1

11 years agoSearch the index case-insensitively
Alex Crichton [Wed, 21 Jan 2015 20:24:34 +0000 (12:24 -0800)]
Search the index case-insensitively

All crates published will enter the index in an all-lowercase fashion. This is
done because the index may be checked out on case-insensitive filesystems and
its integrity needs to be preserved. When looking for a file in the index, a
crate's name is transformed to all lowercase, but the mentioned name in the
index is verified against the name queried to ensure that they match.

Closes rust-lang/crates.io#93
cc rust-lang/crates.io-index#1

11 years agoAuto merge of #1199 - retep998:winapi, r=alexcrichton
bors [Tue, 20 Jan 2015 17:24:32 +0000 (17:24 +0000)]
Auto merge of #1199 - retep998:winapi, r=alexcrichton

11 years agoFix printing full descriptions on --verbose
Alex Crichton [Tue, 20 Jan 2015 16:07:26 +0000 (08:07 -0800)]
Fix printing full descriptions on --verbose

Previously an error's description was not printed at all if it was not a "human
error". This alters the logic to always print the description on --verbose, as
well as ensuring that --verbose is suggested if this is the case and we're not
verbose.

Closes #1201

11 years agoUse external crates for Windows FFI
Peter Atashian [Tue, 20 Jan 2015 16:01:52 +0000 (11:01 -0500)]
Use external crates for Windows FFI

Signed-off-by: Peter Atashian <retep998@gmail.com>
11 years agoAuto merge of #1190 - alexcrichton:issue-1186, r=alexcrichton
bors [Tue, 20 Jan 2015 04:51:54 +0000 (04:51 +0000)]
Auto merge of #1190 - alexcrichton:issue-1186, r=alexcrichton

Closes #1186

11 years agoAuto merge of #1195 - alexcrichton:no-more-build-command, r=huonw
bors [Tue, 20 Jan 2015 01:25:10 +0000 (01:25 +0000)]
Auto merge of #1195 - alexcrichton:no-more-build-command, r=huonw

Along the way this also fixes a few bugs with build scripts with respect to dynamic native libraries which are linked into build scripts themselves.

11 years agoAuto merge of #1196 - alexcrichton:issue-1187, r=alexcrichton
bors [Tue, 20 Jan 2015 00:38:16 +0000 (00:38 +0000)]
Auto merge of #1196 - alexcrichton:issue-1187, r=alexcrichton

Closes #1187

11 years agoFix code example in the guide
Alex Crichton [Tue, 20 Jan 2015 00:03:41 +0000 (16:03 -0800)]
Fix code example in the guide

Closes #1187

11 years agoAugment dylib search paths for rustc/build scripts
Alex Crichton [Mon, 19 Jan 2015 23:46:07 +0000 (15:46 -0800)]
Augment dylib search paths for rustc/build scripts

Whenever a build script or a plugin depends on a native dynamic library, the
dylib search path will be required to include the path to the generated dynamic
library. Currently Cargo does not augment the search path, causing load errors
or execution errors whenever builds are attempted in this case.

This commit remedies the situation by ensuring that dynamic libraries show up in
dylib search paths. This commit is necessary to fully migrate the remaining
tests from the old build command infrastructure to build scripts.

11 years agoRemove infrastructure for the old custom build command
Alex Crichton [Mon, 19 Jan 2015 22:27:51 +0000 (14:27 -0800)]
Remove infrastructure for the old custom build command

This aspect of the manifest has been deprecated for quite some time now, and
this commit purges the support entirely.

11 years agoAuto merge of #1193 - alexcrichton:update, r=huonw
bors [Mon, 19 Jan 2015 23:13:03 +0000 (23:13 +0000)]
Auto merge of #1193 - alexcrichton:update, r=huonw

One important update this picks up is toml-rs v0.1.13 which includes some recent changes to the TOML spec (shouldn't be breaking for Cargo though)

11 years agoUpdate to rust master
Alex Crichton [Mon, 19 Jan 2015 21:19:46 +0000 (13:19 -0800)]
Update to rust master

11 years agoAuto merge of #1191 - alexcrichton:fix-bots, r=huonw
bors [Mon, 19 Jan 2015 07:28:44 +0000 (07:28 +0000)]
Auto merge of #1191 - alexcrichton:fix-bots, r=huonw

The nightly bots are all failing because a nightly build emits a .cargo/config
which uses `[target]` for some overrides, but a test was creating invalid
configuration for `[target]`, causing the test error message to change.

This commit fixes the test by using a different error message (which should not
conflict). It also improves the error message for "configuration could not be
merged" to include more contextual information about what just happened.

11 years agoFix nightly and improve merge error message
Alex Crichton [Mon, 19 Jan 2015 05:02:25 +0000 (21:02 -0800)]
Fix nightly and improve merge error message

The nightly bots are all failing because a nightly build emits a .cargo/config
which uses `[target]` for some overrides, but a test was creating invalid
configuration for `[target]`, causing the test error message to change.

This commit fixes the test by using a different error message (which should not
conflict). It also improves the error message for "configuration could not be
merged" to include more contextual information about what just happened.

11 years agoUpdate `cargo update` syntax in the guide
Alex Crichton [Mon, 19 Jan 2015 02:56:30 +0000 (18:56 -0800)]
Update `cargo update` syntax in the guide

Closes #1186

11 years agoAuto merge of #1189 - alexcrichton:issue-1185, r=huonw
bors [Mon, 19 Jan 2015 02:53:02 +0000 (02:53 +0000)]
Auto merge of #1189 - alexcrichton:issue-1185, r=huonw

Closes #1185

11 years agoUpdate build script docs for rustc changes
Alex Crichton [Mon, 19 Jan 2015 02:36:17 +0000 (18:36 -0800)]
Update build script docs for rustc changes

Closes #1185

11 years agoAuto merge of #1183 - parkr:patch-1, r=wycats
bors [Sun, 18 Jan 2015 18:25:21 +0000 (18:25 +0000)]
Auto merge of #1183 - parkr:patch-1, r=wycats

This seemed a little crucial.

11 years agoAdd note about specifying dependencies.
Parker Moore [Sat, 17 Jan 2015 08:55:58 +0000 (00:55 -0800)]
Add note about specifying dependencies.

11 years agoAuto merge of #1176 - alexcrichton:less-relative, r=alexcrichton
bors [Fri, 16 Jan 2015 19:56:26 +0000 (19:56 +0000)]
Auto merge of #1176 - alexcrichton:less-relative, r=alexcrichton

Turns out path_relative_from returns Some even if they're not ancestors of one
another! This adds an explicit check for `is_ancestor_of`.

11 years agoActually use absolute paths for crates.io crates
Alex Crichton [Thu, 15 Jan 2015 20:17:18 +0000 (12:17 -0800)]
Actually use absolute paths for crates.io crates

Turns out path_relative_from returns Some even if they're not ancestors of one
another! This adds an explicit check for `is_ancestor_of`.

11 years agoAuto merge of #1172 - alexcrichton:issue-1087, r=huonw
bors [Fri, 16 Jan 2015 19:03:06 +0000 (19:03 +0000)]
Auto merge of #1172 - alexcrichton:issue-1087, r=huonw

These commits aim to streamline how errors are generated and how configuration is read to be less error prone and more easily extensible.

This was a whole bunch of yak shaving when tackling #1087.

11 years agoPrint human errors in traces by default
Alex Crichton [Fri, 16 Jan 2015 17:43:28 +0000 (09:43 -0800)]
Print human errors in traces by default

This helps get nice pretty stack traces which terminate when we get into the
weeds of errors but still present relevant contextual information when Cargo
isn't run with --verbose

11 years agoDon't lose error traces in manifest parse errors
Alex Crichton [Thu, 15 Jan 2015 19:12:13 +0000 (11:12 -0800)]
Don't lose error traces in manifest parse errors

Closes #1174

11 years agoAllow configuration of jobs by default via build.jobs
Alex Crichton [Thu, 15 Jan 2015 08:20:56 +0000 (00:20 -0800)]
Allow configuration of jobs by default via build.jobs

Continuation of #1114
Closes #1108